<template>
  <div>
    <template v-if="!value.source">
      <template v-if="value.theme == 'default' || value.theme == 'border' ">
        <el-checkbox-group v-model="checkList" :size="value.size">
          <el-checkbox v-for="(item,index) in value.options" :key="index" :label="item.value" :border="value.theme == 'border' ? true : false" :disabled="item.disabled">{{item.label}}</el-checkbox>
        </el-checkbox-group>
      </template>
      <template v-if="value.theme == 'button' ">
        <el-checkbox-group v-model="checkList" :size="value.size">
          <el-checkbox-button v-for="(item,index) in value.options" :key="index" :label="item.value" :border="value.theme == 'border' ? true : false" :disabled="item.disabled">{{item.label}}</el-checkbox-button>
        </el-checkbox-group>
      </template>
    </template>
  </div>
</template>
<script type="text/javascript">
// import Logo from '~/components/Logo.vue'
export default {
  props: {
    value: [Array, Object]
  },
  components: {
    //Logo
  },
  data() {
    return {
      checkList: [1]
    }
  },
  /**
   * 计算属性
   * @type {Object}
   */
  computed: {

  },
  /**
   * 数据监听
   * @type {Object}
   */
  watch: {

  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {

  },
  /**
   * 页面方法
   * @type {Object}
   */
  methods: {

  }
}

</script>
<style type="text/css" lang="scss">
.checkbox-view {
  .el-checkbox {
    margin-right: 10px;
  }

  .el-checkbox.is-bordered+.el-checkbox.is-bordered {
    margin-left: 0px;
  }

  .el-checkbox-group {
    .is-bordered:last-child {
      margin-right: 0px;
    }
  }
}

</style>
